package com.tw.people.util;

/**
 * Created by IntelliJ IDEA.
 * User: twer
 * Date: 12/18/11
 * Time: 1:44 PM
 * To change this template use File | Settings | File Templates.
 */
public class TimeSheetRecord {
    private String empId;
    private String name;
    private String days;

    public TimeSheetRecord(String empId, String name, String days) {
        this.empId = empId;
        this.name = name;
        this.days = days;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TimeSheetRecord that = (TimeSheetRecord) o;

        if (days != null ? !days.equals(that.days) : that.days != null) return false;
        if (empId != null ? !empId.equals(that.empId) : that.empId != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = empId != null ? empId.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (days != null ? days.hashCode() : 0);
        return result;
    }

    public String toString() {
        return empId + ":" + name + ": " + days;
    }
}
